<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>06_DOM0-高级浏览器-解绑</title>
    </head>
    <body>
        <button id="bind">绑定</button>
        <button id="unBind">解绑</button>

        <script>
            var bind = document.querySelector('#bind');

            bind.onclick = function(){
                console.log(1111);
            }


            var unBind = document.querySelector('#unBind');
            unBind.onclick = function(){
                // 解绑逻辑
                bind.onclick = null;
            }
        </script>
    </body>
</html>